package de.tabuma.formcreator.javascript.logik;

import de.tabuma.formcreator.entity.*;

/**
  * @author $Author: $
  * @version $Revision: $
  * @since $Date: $
 */
public class JSLib {

    //Settings for controller
    public static String getStartControllerName()                   { return "startController"; }
    public static String getSaveControllerName(FormStructur fs)     { return "saveObject"+fs.getId()+"Controller"; }
    public static String getSaveElementsControllerName(FormStructur fs) { return "saveElements"+fs.getId()+"Controller"; }
    public static String getSaveCancelControllerName(FormStructur fs){return "savaCancelObject"+fs.getId()+"Controller"; }
    public static String getStartRemoveControllerName(FormStructur fs) {return "startRemoveOjbect"+fs.getId()+"Controller"; }
    public static String getRemoveControllerName(FormStructur fs)   { return "removeObject"+fs.getId()+"Controller"; }
    public static String getRemoveCancelControllerName(FormStructur fs){return "removeObject"+fs.getId()+"CancelController"; }
    public static String getRemoveController1Name(FormStructur fs)  { return "removeObject"+fs.getId()+"Controller1"; }
    public static String getAddElementControllerName(FormStructur fs){return "addElement"+fs.getId()+"Controller"; }
    public static String getEditElementControllerName(FormStructur fs) {return "editElement"+fs.getId()+"Controller"; }
    public static String getSendDataControllerName()                { return "sendDataController"; }
    public static String getShowDescriptionControllerName(FormStructur fs) { return "showDescription"+fs.getId()+"Controller"; }
    public static String getUnshowDescriptionControllerName(FormStructur fs) { return "unshowDescription"+fs.getId()+"Controller"; }

    //Settings for entity
    public static String getObjectName(FormStructur fs)             { return "Object"+fs.getId(); }
    public static String getObjectContructurName(FormStructur fs)   { return "Object"+fs.getId()+"Constructur"; }
    public static String getObjectGetterName(FormElement fs)        { return "getObject"+fs.getId(); }
    public static String getObjectSetterName(FormElement fs)        { return "setObject"+fs.getId(); }
    public static String getObjectAddList(FormElement fs)           { return "addObject"+fs.getId(); }
    public static String getObjectField(FormStructur fs)            { return "Object"+fs.getId(); }
    public static String getObjectCounter(FormStructur fs)          { return "ObjectCounter"+fs.getId(); }
    public static String getObjectRemoveList(FormElement fs)        { return "removeObject"+fs.getId(); }
    public static String getObjectInsertElementIntoList(FormElement fs) {return "insertObjectIntoList"+fs.getId(); }
    public static String getRemoveElementFromArrayList()            { return "removeElementFromArrayList"; }
    public static String getStructurAsXML()                         { return "getStructurAsXml"; }
    public static String getFromXmlToObjectFunction(FormStructur fs){ return "getFromXmlToObject"+fs.getId(); }

    //Settings for view
    public static String getElementName(FormElement fs)             { return "element"+fs.getId(); }
    public static String getRemoveView(FormStructur fs)             { return "removeView"+fs.getId(); }
    public static String getPrintIframe()                           { return "printIFrame"; }
    public static String getListContentName(FormStructur fs)        { return "listContent"+fs.getId(); }
    public static String getPrintView(FormStructur fs)              { return "printView"+fs.getId(); }
    public static String getDescriptionVar(FormStructur fs)            { return "descriptionObject"+fs.getId(); }
    public static String getDescriptionFunction(FormStructur fs)    { return "descriptionView"+fs.getId(); }

    //Settings for logging
    public static String getLoggingObject()                         { return "loggingObject"; }
    public static String getLoggingFunction()                       { return "loggingFunction"; }
    public static String getLoggingTextarea()                       { return "loggingTextarea"; }

    //Settings for data sending / receiving
    public static String getSendDataFunction()                      { return "sendDataFunction"; }
    public static String getResponseDataFunction()                  { return "responseDataFunction"; }
    public static String getWaitingWindow()                         { return "getWaitingWindow"; }
}
